Optimal. Leaf size=223 \[ -\frac {2 A b^2-a b B-6 a A c}{2 a^2 \left (b^2-4 a c\right ) x^2}-\frac {a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) x^2 \left (a+b x^2+c x^4\right )}+\frac {\left (a b B \left (b^2-6 a c\right )-2 A \left (b^4-6 a b^2 c+6 a^2 c^2\right )\right ) \tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 a^3 \left (b^2-4 a c\right )^{3/2}}-\frac {(2 A b-a B) \log (x)}{a^3}+\frac {(2 A b-a B) \log \left (a+b x^2+c x^4\right )}{4 a^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 223, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {1265, 836, 814,
648, 632, 212, 642} \begin {gather*} \frac {(2 A b-a B) \log \left (a+b x^2+c x^4\right )}{4 a^3}-\frac {\log (x) (2 A b-a B)}{a^3}-\frac {-6 a A c-a b B+2 A b^2}{2 a^2 x^2 \left (b^2-4 a c\right )}+\frac {\left (a b B \left (b^2-6 a c\right )-2 A \left (6 a^2 c^2-6 a b^2 c+b^4\right )\right ) \tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 a^3 \left (b^2-4 a c\right )^{3/2}}-\frac {-A \left (b^2-2 a c\right )-\left (c x^2 (A b-2 a B)\right )+a b B}{2 a x^2 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 814
Rule 836
Rule 1265
Rubi steps
\begin {align*} \int \frac {A+B x^2}{x^3 \left (a+b x^2+c x^4\right )^2} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {A+B x}{x^2 \left (a+b x+c x^2\right )^2} \, dx,x,x^2\right )\\ &=-\frac {a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) x^2 \left (a+b x^2+c x^4\right )}-\frac {\text {Subst}\left (\int \frac {-2 A b^2+a b B+6 a A c-2 (A b-2 a B) c x}{x^2 \left (a+b x+c x^2\right )} \, dx,x,x^2\right )}{2 a \left (b^2-4 a c\right )}\\ &=-\frac {a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) x^2 \left (a+b x^2+c x^4\right )}-\frac {\text {Subst}\left (\int \left (\frac {-2 A b^2+a b B+6 a A c}{a x^2}+\frac {(-2 A b+a B) \left (-b^2+4 a c\right )}{a^2 x}+\frac {a b B \left (b^2-5 a c\right )-2 A \left (b^4-5 a b^2 c+3 a^2 c^2\right )-(2 A b-a B) c \left (b^2-4 a c\right ) x}{a^2 \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )}{2 a \left (b^2-4 a c\right )}\\ &=-\frac {2 A b^2-a b B-6 a A c}{2 a^2 \left (b^2-4 a c\right ) x^2}-\frac {a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) x^2 \left (a+b x^2+c x^4\right )}-\frac {(2 A b-a B) \log (x)}{a^3}-\frac {\text {Subst}\left (\int \frac {a b B \left (b^2-5 a c\right )-2 A \left (b^4-5 a b^2 c+3 a^2 c^2\right )-(2 A b-a B) c \left (b^2-4 a c\right ) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 a^3 \left (b^2-4 a c\right )}\\ &=-\frac {2 A b^2-a b B-6 a A c}{2 a^2 \left (b^2-4 a c\right ) x^2}-\frac {a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) x^2 \left (a+b x^2+c x^4\right )}-\frac {(2 A b-a B) \log (x)}{a^3}+\frac {(2 A b-a B) \text {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a^3}-\frac {\left (a b B \left (b^2-6 a c\right )-2 A \left (b^4-6 a b^2 c+6 a^2 c^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a^3 \left (b^2-4 a c\right )}\\ &=-\frac {2 A b^2-a b B-6 a A c}{2 a^2 \left (b^2-4 a c\right ) x^2}-\frac {a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) x^2 \left (a+b x^2+c x^4\right )}-\frac {(2 A b-a B) \log (x)}{a^3}+\frac {(2 A b-a B) \log \left (a+b x^2+c x^4\right )}{4 a^3}+\frac {\left (a b B \left (b^2-6 a c\right )-2 A \left (b^4-6 a b^2 c+6 a^2 c^2\right )\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 a^3 \left (b^2-4 a c\right )}\\ &=-\frac {2 A b^2-a b B-6 a A c}{2 a^2 \left (b^2-4 a c\right ) x^2}-\frac {a b B-A \left (b^2-2 a c\right )-(A b-2 a B) c x^2}{2 a \left (b^2-4 a c\right ) x^2 \left (a+b x^2+c x^4\right )}+\frac {\left (a b B \left (b^2-6 a c\right )-2 A \left (b^4-6 a b^2 c+6 a^2 c^2\right )\right ) \tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{2 a^3 \left (b^2-4 a c\right )^{3/2}}-\frac {(2 A b-a B) \log (x)}{a^3}+\frac {(2 A b-a B) \log \left (a+b x^2+c x^4\right )}{4 a^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.38, size = 379, normalized size = 1.70 \begin {gather*} \frac {-\frac {2 a A}{x^2}-\frac {2 a \left (a B \left (-b^2+2 a c-b c x^2\right )+A \left (b^3-3 a b c+b^2 c x^2-2 a c^2 x^2\right )\right )}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+4 (-2 A b+a B) \log (x)+\frac {\left (a B \left (-b^3+6 a b c-b^2 \sqrt {b^2-4 a c}+4 a c \sqrt {b^2-4 a c}\right )+2 A \left (b^4-6 a b^2 c+6 a^2 c^2+b^3 \sqrt {b^2-4 a c}-4 a b c \sqrt {b^2-4 a c}\right )\right ) \log \left (b-\sqrt {b^2-4 a c}+2 c x^2\right )}{\left (b^2-4 a c\right )^{3/2}}+\frac {\left (a B \left (b^3-6 a b c-b^2 \sqrt {b^2-4 a c}+4 a c \sqrt {b^2-4 a c}\right )+2 A \left (-b^4+6 a b^2 c-6 a^2 c^2+b^3 \sqrt {b^2-4 a c}-4 a b c \sqrt {b^2-4 a c}\right )\right ) \log \left (b+\sqrt {b^2-4 a c}+2 c x^2\right )}{\left (b^2-4 a c\right )^{3/2}}}{4 a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 300, normalized size = 1.35
method | result | size |
default | \(-\frac {\frac {\frac {a c \left (2 a c A -A \,b^{2}+a b B \right ) x^{2}}{4 a c -b^{2}}+\frac {a \left (3 A a b c -A \,b^{3}-2 a^{2} c B +B a \,b^{2}\right )}{4 a c -b^{2}}}{c \,x^{4}+b \,x^{2}+a}+\frac {\frac {\left (-8 A a b \,c^{2}+2 A \,b^{3} c +4 a^{2} B \,c^{2}-a \,b^{2} B c \right ) \ln \left (c \,x^{4}+b \,x^{2}+a \right )}{2 c}+\frac {2 \left (6 A \,a^{2} c^{2}-10 A a \,b^{2} c +2 A \,b^{4}+5 a^{2} b B c -B a \,b^{3}-\frac {\left (-8 A a b \,c^{2}+2 A \,b^{3} c +4 a^{2} B \,c^{2}-a \,b^{2} B c \right ) b}{2 c}\right ) \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{4 a c -b^{2}}}{2 a^{3}}-\frac {A}{2 a^{2} x^{2}}+\frac {\left (-2 A b +a B \right ) \ln \left (x \right )}{a^{3}}\) | \(300\) |
risch | \(\frac {-\frac {c \left (6 a c A -2 A \,b^{2}+a b B \right ) x^{4}}{2 a^{2} \left (4 a c -b^{2}\right )}-\frac {\left (7 A a b c -2 A \,b^{3}-2 a^{2} c B +B a \,b^{2}\right ) x^{2}}{2 \left (4 a c -b^{2}\right ) a^{2}}-\frac {A}{2 a}}{x^{2} \left (c \,x^{4}+b \,x^{2}+a \right )}-\frac {2 \ln \left (x \right ) A b}{a^{3}}+\frac {\ln \left (x \right ) B}{a^{2}}+\frac {\left (\munderset {\textit {\_R} =\RootOf \left (\left (64 a^{6} c^{3}-48 a^{5} b^{2} c^{2}+12 a^{4} b^{4} c -a^{3} b^{6}\right ) \textit {\_Z}^{2}+\left (-128 a^{3} b \,c^{3} A +96 a^{2} b^{3} c^{2} A -24 a \,b^{5} c A +2 b^{7} A +64 a^{4} c^{3} B -48 a^{3} b^{2} c^{2} B +12 a^{2} b^{4} c B -a \,b^{6} B \right ) \textit {\_Z} +36 a \,c^{4} A^{2}-8 b^{2} c^{3} A^{2}-28 a b \,c^{3} A B +6 b^{3} c^{2} A B +16 a^{2} c^{3} B^{2}-3 a \,b^{2} c^{2} B^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (\left (-160 a^{7} c^{3}+128 a^{6} b^{2} c^{2}-34 a^{5} b^{4} c +3 a^{4} b^{6}\right ) \textit {\_R}^{2}+\left (136 A \,a^{4} b \,c^{3}-66 A \,a^{3} b^{3} c^{2}+8 A \,a^{2} b^{5} c -80 B \,a^{5} c^{3}+36 B \,a^{4} b^{2} c^{2}-4 B \,a^{3} b^{4} c \right ) \textit {\_R} -72 A^{2} a^{2} c^{4}+48 A^{2} a \,b^{2} c^{3}-8 A^{2} b^{4} c^{2}-24 A B \,a^{2} b \,c^{3}+8 A B a \,b^{3} c^{2}-2 B^{2} a^{2} b^{2} c^{2}\right ) x^{2}+\left (16 a^{7} b \,c^{2}-8 a^{6} b^{3} c +a^{5} b^{5}\right ) \textit {\_R}^{2}+\left (-24 A \,a^{5} c^{3}+78 A \,a^{4} b^{2} c^{2}-34 A \,a^{3} b^{4} c +4 A \,a^{2} b^{6}-36 B \,a^{5} b \,c^{2}+17 B \,a^{4} b^{3} c -2 B \,a^{3} b^{5}\right ) \textit {\_R} -96 A^{2} a^{2} b \,c^{3}+56 A^{2} a \,b^{3} c^{2}-8 A^{2} b^{5} c +48 A B \,a^{3} c^{3}-44 A B \,a^{2} b^{2} c^{2}+8 A B a \,b^{4} c +8 B^{2} a^{3} b \,c^{2}-2 B^{2} a^{2} b^{3} c \right )\right )}{2}\) | \(690\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 806 vs.
\(2 (207) = 414\).
time = 1.34, size = 1635, normalized size = 7.33 \begin {gather*} \left [-\frac {2 \, A a^{2} b^{4} - 16 \, A a^{3} b^{2} c + 32 \, A a^{4} c^{2} + 2 \, {\left (24 \, A a^{3} c^{3} + 2 \, {\left (2 \, B a^{3} b - 7 \, A a^{2} b^{2}\right )} c^{2} - {\left (B a^{2} b^{3} - 2 \, A a b^{4}\right )} c\right )} x^{4} - 2 \, {\left (B a^{2} b^{4} - 2 \, A a b^{5} + 4 \, {\left (2 \, B a^{4} - 7 \, A a^{3} b\right )} c^{2} - 3 \, {\left (2 \, B a^{3} b^{2} - 5 \, A a^{2} b^{3}\right )} c\right )} x^{2} + {\left ({\left (12 \, A a^{2} c^{3} + 6 \, {\left (B a^{2} b - 2 \, A a b^{2}\right )} c^{2} - {\left (B a b^{3} - 2 \, A b^{4}\right )} c\right )} x^{6} - {\left (B a b^{4} - 2 \, A b^{5} - 12 \, A a^{2} b c^{2} - 6 \, {\left (B a^{2} b^{2} - 2 \, A a b^{3}\right )} c\right )} x^{4} - {\left (B a^{2} b^{3} - 2 \, A a b^{4} - 12 \, A a^{3} c^{2} - 6 \, {\left (B a^{3} b - 2 \, A a^{2} b^{2}\right )} c\right )} x^{2}\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c + {\left (2 \, c x^{2} + b\right )} \sqrt {b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) + {\left ({\left (16 \, {\left (B a^{3} - 2 \, A a^{2} b\right )} c^{3} - 8 \, {\left (B a^{2} b^{2} - 2 \, A a b^{3}\right )} c^{2} + {\left (B a b^{4} - 2 \, A b^{5}\right )} c\right )} x^{6} + {\left (B a b^{5} - 2 \, A b^{6} + 16 \, {\left (B a^{3} b - 2 \, A a^{2} b^{2}\right )} c^{2} - 8 \, {\left (B a^{2} b^{3} - 2 \, A a b^{4}\right )} c\right )} x^{4} + {\left (B a^{2} b^{4} - 2 \, A a b^{5} + 16 \, {\left (B a^{4} - 2 \, A a^{3} b\right )} c^{2} - 8 \, {\left (B a^{3} b^{2} - 2 \, A a^{2} b^{3}\right )} c\right )} x^{2}\right )} \log \left (c x^{4} + b x^{2} + a\right ) - 4 \, {\left ({\left (16 \, {\left (B a^{3} - 2 \, A a^{2} b\right )} c^{3} - 8 \, {\left (B a^{2} b^{2} - 2 \, A a b^{3}\right )} c^{2} + {\left (B a b^{4} - 2 \, A b^{5}\right )} c\right )} x^{6} + {\left (B a b^{5} - 2 \, A b^{6} + 16 \, {\left (B a^{3} b - 2 \, A a^{2} b^{2}\right )} c^{2} - 8 \, {\left (B a^{2} b^{3} - 2 \, A a b^{4}\right )} c\right )} x^{4} + {\left (B a^{2} b^{4} - 2 \, A a b^{5} + 16 \, {\left (B a^{4} - 2 \, A a^{3} b\right )} c^{2} - 8 \, {\left (B a^{3} b^{2} - 2 \, A a^{2} b^{3}\right )} c\right )} x^{2}\right )} \log \left (x\right )}{4 \, {\left ({\left (a^{3} b^{4} c - 8 \, a^{4} b^{2} c^{2} + 16 \, a^{5} c^{3}\right )} x^{6} + {\left (a^{3} b^{5} - 8 \, a^{4} b^{3} c + 16 \, a^{5} b c^{2}\right )} x^{4} + {\left (a^{4} b^{4} - 8 \, a^{5} b^{2} c + 16 \, a^{6} c^{2}\right )} x^{2}\right )}}, -\frac {2 \, A a^{2} b^{4} - 16 \, A a^{3} b^{2} c + 32 \, A a^{4} c^{2} + 2 \, {\left (24 \, A a^{3} c^{3} + 2 \, {\left (2 \, B a^{3} b - 7 \, A a^{2} b^{2}\right )} c^{2} - {\left (B a^{2} b^{3} - 2 \, A a b^{4}\right )} c\right )} x^{4} - 2 \, {\left (B a^{2} b^{4} - 2 \, A a b^{5} + 4 \, {\left (2 \, B a^{4} - 7 \, A a^{3} b\right )} c^{2} - 3 \, {\left (2 \, B a^{3} b^{2} - 5 \, A a^{2} b^{3}\right )} c\right )} x^{2} + 2 \, {\left ({\left (12 \, A a^{2} c^{3} + 6 \, {\left (B a^{2} b - 2 \, A a b^{2}\right )} c^{2} - {\left (B a b^{3} - 2 \, A b^{4}\right )} c\right )} x^{6} - {\left (B a b^{4} - 2 \, A b^{5} - 12 \, A a^{2} b c^{2} - 6 \, {\left (B a^{2} b^{2} - 2 \, A a b^{3}\right )} c\right )} x^{4} - {\left (B a^{2} b^{3} - 2 \, A a b^{4} - 12 \, A a^{3} c^{2} - 6 \, {\left (B a^{3} b - 2 \, A a^{2} b^{2}\right )} c\right )} x^{2}\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {{\left (2 \, c x^{2} + b\right )} \sqrt {-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) + {\left ({\left (16 \, {\left (B a^{3} - 2 \, A a^{2} b\right )} c^{3} - 8 \, {\left (B a^{2} b^{2} - 2 \, A a b^{3}\right )} c^{2} + {\left (B a b^{4} - 2 \, A b^{5}\right )} c\right )} x^{6} + {\left (B a b^{5} - 2 \, A b^{6} + 16 \, {\left (B a^{3} b - 2 \, A a^{2} b^{2}\right )} c^{2} - 8 \, {\left (B a^{2} b^{3} - 2 \, A a b^{4}\right )} c\right )} x^{4} + {\left (B a^{2} b^{4} - 2 \, A a b^{5} + 16 \, {\left (B a^{4} - 2 \, A a^{3} b\right )} c^{2} - 8 \, {\left (B a^{3} b^{2} - 2 \, A a^{2} b^{3}\right )} c\right )} x^{2}\right )} \log \left (c x^{4} + b x^{2} + a\right ) - 4 \, {\left ({\left (16 \, {\left (B a^{3} - 2 \, A a^{2} b\right )} c^{3} - 8 \, {\left (B a^{2} b^{2} - 2 \, A a b^{3}\right )} c^{2} + {\left (B a b^{4} - 2 \, A b^{5}\right )} c\right )} x^{6} + {\left (B a b^{5} - 2 \, A b^{6} + 16 \, {\left (B a^{3} b - 2 \, A a^{2} b^{2}\right )} c^{2} - 8 \, {\left (B a^{2} b^{3} - 2 \, A a b^{4}\right )} c\right )} x^{4} + {\left (B a^{2} b^{4} - 2 \, A a b^{5} + 16 \, {\left (B a^{4} - 2 \, A a^{3} b\right )} c^{2} - 8 \, {\left (B a^{3} b^{2} - 2 \, A a^{2} b^{3}\right )} c\right )} x^{2}\right )} \log \left (x\right )}{4 \, {\left ({\left (a^{3} b^{4} c - 8 \, a^{4} b^{2} c^{2} + 16 \, a^{5} c^{3}\right )} x^{6} + {\left (a^{3} b^{5} - 8 \, a^{4} b^{3} c + 16 \, a^{5} b c^{2}\right )} x^{4} + {\left (a^{4} b^{4} - 8 \, a^{5} b^{2} c + 16 \, a^{6} c^{2}\right )} x^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.44, size = 250, normalized size = 1.12 \begin {gather*} -\frac {{\left (B a b^{3} - 2 \, A b^{4} - 6 \, B a^{2} b c + 12 \, A a b^{2} c - 12 \, A a^{2} c^{2}\right )} \arctan \left (\frac {2 \, c x^{2} + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{2 \, {\left (a^{3} b^{2} - 4 \, a^{4} c\right )} \sqrt {-b^{2} + 4 \, a c}} + \frac {B a b c x^{4} - 2 \, A b^{2} c x^{4} + 6 \, A a c^{2} x^{4} + B a b^{2} x^{2} - 2 \, A b^{3} x^{2} - 2 \, B a^{2} c x^{2} + 7 \, A a b c x^{2} - A a b^{2} + 4 \, A a^{2} c}{2 \, {\left (c x^{6} + b x^{4} + a x^{2}\right )} {\left (a^{2} b^{2} - 4 \, a^{3} c\right )}} - \frac {{\left (B a - 2 \, A b\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, a^{3}} + \frac {{\left (B a - 2 \, A b\right )} \log \left (x^{2}\right )}{2 \, a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.09, size = 2500, normalized size = 11.21 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________